import Vue from 'vue'
import Router from 'vue-router'
import Home_page from "@/components/Home_page";
import Login from "@/components/Login"
import Register from "../components/Register"
import QQCallBack from "../components/QQCallBack"
import Writer from "../components/Writer"
import PostArticle from "../components/PostArticle";
import Article from "../components/Article";
import Wallet from "../components/Wallet";
Vue.use(Router)

export default new Router({
  mode: "history",
  routes: [
    {
      name:"Home_page",
      path: '/',
      component:Home_page,

    },
    {
      name:"Login",
      path: '/user/login',
      component:Login,

    },
    {
      name:"Register",
      path:'/user/register',
      component:Register,
    },
    {
      name:"QQCallBack",
      path:"/oauth_callback.html",// 改成自己注册QQ登录时的地址,不是一定要.html,只是我当初不小心加了而已
      component:QQCallBack
    },
    {
      name:"Writer",
      path:"/writer",
      component:Writer,
    },
    {
      name:"Post",
      path:"/post",
      component:PostArticle,
    },
    {
      name:"Article",
      path:"/article/:id",
      component:Article,
    },
    {
      name:"Wallet",
      path:"/usr/wallet",
      component:Wallet,
    },
  ]
})
